package com.modern.pojo;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class Result {
    Integer code;
    String msg;
    Object data;
    public static Result success(Object data){
        Integer code=1;
        String msg="success";
        return new Result(code,msg,data);
    }
    public static Result success(){
        Integer code=1;
        String msg="success";
        return new Result(code,msg,null);
    }
    public static Result error(String msg){
        Integer code=0;
        return new Result(code,msg,null);
    }
}
